<?php
namespace app\index\model;
use think\Model;
class browserecords extends Model{
    //model的构造方法
    protected function initialize(){
        parent::initialize();
    }
    //获取访问人数
    public function getBrowseNumber(){
        $res = $this->select();
        return $res[0]['times'];
    }

    //更新访问人数
    public function updataBrowseNumber(){
        return  $this->where('id',1)->setInc('times');

    }

} 